home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 501-525 / disk_517 / aequipot / source / reqlibrary.i < prev   
Text File  |  1992-05-06  |  8KB  |  194 lines

  1. { reqlibrary.h © 1988/1989/1990 reserved by Colin Fox and Bruce Dawson }
  2. { changed for PCQ-Pascal 91/06/12 by Juergen Matern }
  3.  
  4. {     $Filename: libraries/reqbase.i $
  5.       $Release: 2.0 release 1 $
  6.       $Revision: 2.5 $
  7.       $Date: 90/11/23 $
  8.  
  9.       req.library definitions }
  10.  
  11. {$I "Include:dos.i" }
  12. {$I "Include:Intuition.i" }
  13. {$I "Include:Graphics.i" }
  14.  
  15. {         This structure is for use with the GetLong function.}
  16.  
  17. CONST
  18.    GLNODEFAULTM = 1; {Set this in the flags if you don't want a default}
  19.                      {value to show up in the get long string gadget.  For}
  20.                      {some things this is much better than having a zero}
  21.                      {show up.}
  22.  
  23. TYPE
  24.  
  25. GetLongStruct = Record
  26.    titlebar   : Address;
  27.    defaultval : Integer;
  28.    minlimit   : Integer;
  29.    maxlimit   : Integer;
  30.    result     : Integer;
  31.    Window     : WindowPtr;
  32.    versionnumber : Short;  { Make SURE this is set to REQVERSION. }
  33.    flags      : Integer;   { Some, uh flags. See above for definitions. }
  34.    rfu2       : Integer;   { Make SURE you leave these two zeroed also. }
  35. END;
  36. GetLongPtr = ^GetLongStruct;
  37.  
  38. GetStringStruct = Record
  39.    titlebar     : Address;
  40.    stringbuffer : Address;
  41.    Window       : WindowPtr;
  42.    stringsize   : Short;      { how many characters in the buffer }
  43.    visiblesize  : Short;      { how many characters show on screen }
  44.    versionnumber: Short;      { make sure this is REQVERSION }
  45.    flags        : Integer;
  46.    rfu1         : Integer;
  47.    rfu2         : Integer;
  48.    rfu3         : Integer;
  49. END;
  50. GetStringPtr = ^GetStringStruct;
  51.  
  52. CONST
  53.    REQVERSION = 2;
  54.    DSIZE = 130;
  55.    FCHARS = 30;
  56.    WILDLENGTH = 30;
  57.  
  58. {  These are the mask values that you can OR into the Flags field of the
  59.    file requester structure. }
  60.  
  61.    FRQSHOWINFOM    = $0001; { Set this in Flags if you want .info files to show.  They default to hidden. }
  62.    FRQEXTSELECTM   = $0002; { Set this in Flags if you want extended select.  Default is not. }
  63.    FRQCACHINGM     = $0004; { Set this in Flags if you want directory caching.  Default is not. }
  64.    FRQGETFONTSM    = $0008; { Set this in Flags if you want a font requester rather than a file requester. }
  65.    FRQINFOGADGETM  = $0010; { Set this in Flags if you want a hide-info files gadget. }
  66.    FRQHIDEWILDSM   = $0020; { Set this in Flags if you DON'T want 'show' and 'hide' string gadgets. }
  67.    FRQABSOLUTEXYM  = $0040; { Use absolute x,y positions rather than centering on mouse. }
  68.    FRQCACHEPURGEM  = $0080; { Purge the cache whenever the directory date stamp changes if this is set. }
  69.    FRQNOHALFCACHEM = $0100; { Don't cache a directory unless it is completely read in when this is set. }
  70.    FRQNOSORTM      = $0200; { Set this in Flags if you DON'T want sorted directories. }
  71.    FRQNODRAGM      = $0400; { Set this in Flags if you DON'T want a drag bar and depth gadgets. }
  72.    FRQSAVINGM      = $0800; { Set this if you are selecting a file to save to. }
  73.    FRQLOADINGM     = $1000; { Set this if you are selecting a file(s) to load from. }
  74.                             { These two (save and load) aren't currently used for }
  75.                             { anything, but they may be in the future, so you should }
  76.                             { remember to set them.  Also, these bits make it easier if }
  77.                             { somebody wants to customize the file requester for their }
  78.                             { machine.  They can make it behave differently for loading }
  79.                             { vs saving. }
  80.    FRQDIRONLYM     = $2000; { Allow the user to select a directory, rather than a file. }
  81.  
  82. TYPE
  83.  
  84. ReqFileRequester = Record
  85.    VersionNumber : Short;     { Make sure this is set to REQVERSION. }
  86.  
  87.    Title : Address;           { Hailing text }
  88.    _Dir  : Address;           { Directory array (DSIZE+1) }
  89.    _File : Address;           { Filename array (FCHARS+1) }
  90.  
  91.    PathName : Address;        { Complete path name array (DSIZE+FCHARS+2) }
  92.  
  93.    Window : WindowPtr;        { Window requesting or NULL }
  94.  
  95.  
  96.    MaxExtendedSelect : Short; { Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.}
  97.    numlines : Short;          { Number of lines in file window. }
  98.    numcolumns : Short;        { Number of columns in file window. }
  99.    devcolumns : Short;
  100.    Flags : Integer;           { Various - umm - flags.  See above for more info. }
  101.    dirnamescolor : Short;     { These five colors will all default }
  102.    filenamescolor : Short     { to color one if you don't specify };
  103.    devicenamescolor : Short;  { a color (ie; if you specify color zero). }
  104.    fontnamescolor : Short;    { If you want color zero to be used, specify }
  105.    fontsizecolor : Short;     { color 32, or some other too large number }
  106.                               { which mods down to zero. }
  107.  
  108.    detailcolor : Short;       { If both of these colors are specified as }
  109.    blockcolor : Short;        { zero then the block pen will be set to one. }
  110.  
  111.    gadgettextcolor : Short;   { The color for the text of the five boolean gadgets.  Defaults to 1. }
  112.    textmessagecolor : Short;  { The color for the message at the screen top.  Defaults to 1. }
  113.    stringnamecolor : Short;   { The color for the words Drawer, File, Hide and Show.  Defaults to 3. }
  114.    stringgadgetcolor : Short; { The color for the borders of the string gadgets.  Defaults to 3. }
  115.                               { Unfortunately it is not possible to specify }
  116.                               { the color of the actual text in an Intuition }
  117.                               { string gadget. }
  118.    boxbordercolor : Short;    { The color for the boxes around the file and directory areas.  Defaults to 3. }
  119.    gadgetboxcolor : Short;    { The color for the boxes around the five boolean gadgets.  Defaults to 3. }
  120.  
  121.    FRU_Stuff : Array [1..18] of Short;  { This area, which is reserved for }
  122.                                         { future use, should all be zero. }
  123.  
  124.    DirDateStamp : DateStampRec; { A copy of the cached directories date stamp. }
  125.                                 { There should never be any need to change this. }
  126.  
  127.    WindowLeftEdge : Short;    { These two fields are used for the Center }
  128.    WindowTopEdge : Short;     { function. See the Center() function docs }
  129.                               { for their explanation. }       
  130.  
  131.    FontYSize : Short;         { These fields are used to return the selected }
  132.    FontStyle : Short;         { font size and style, only applicable when the }
  133.                               { font bit is set. }
  134.  
  135.    { If you set the extended select bit and the user extended selects, the list of filenames will start from here.}
  136.    ExtendedSelect : Address;
  137.    Hide : Array [1..WILDLENGTH+2] of char;  { The wildcards text. }
  138.    Show : Array [1..WILDLENGTH+2] of char;  { More wildcards text. }
  139.    FileBufferPos : Short;     { Various fields taken from the various }
  140.    FileDispPos : Short;       { string gadgets so that the cursor }
  141.    DirBufferPos : Short;      { can be returned to the same position }
  142.    DirDispPos : Short;        { on subsequent calls. }                 
  143.    HideBufferPos : Short;
  144.    HideDispPos : Short;
  145.    ShowBufferPos : Short;
  146.    ShowDispPos : Short;
  147.  
  148. {  The  following  fields are PRIVATE!  Don't go messing with them or
  149.    wierd  things may/will happen.  If this isn't enough of a warning, go read
  150.    the one in intuition.h, that should scare you off.  }
  151.  
  152.    Memory : Address;          { Memory allocate for dir entries. }
  153.    Memory2 : Address;         { More memory, used for hidden files. }
  154.    Lock : Address;
  155.    PrivateDirBuffer : Array [1..DSIZE+2] of char;  { Used for keeping a record of which }
  156.                                                    { directory we have file names for. }       
  157.    FileInfoBlock : FileInfoBlockPtr;
  158.    NumEntries : Short;
  159.    NumHiddenEntries : Short;
  160.    filestartnumber : Short;
  161.    devicestartnumber : Short;
  162. end;
  163. ReqFileReqPtr = ^ReqFileRequester;
  164.  
  165. VAR
  166.    ReqBase    : Address;
  167.  
  168. Function FileRequester (ReqFileReq : ReqFileReqPtr) : BOOLEAN;
  169.    External;
  170.  
  171. Procedure PurgeFiles (ReqFileReq : ReqFileReqPtr);
  172.    External;
  173.  
  174. Procedure SimpleRequest (st : String);
  175.    External;
  176.  
  177. Function TwoGadRequest (st : String) : Short;
  178.    External;
  179.  
  180. Function GetLong (ls : GetLongPtr) : Boolean;
  181.    External;
  182.  
  183. Function NewGetString (gs : GetStringPtr) : Boolean;
  184.    External;
  185.  
  186. Procedure ColorRequester (c : Integer);
  187.    External;
  188.  
  189. Procedure Center (y, x : Short; nw : NewWindowPtr );
  190.    External;
  191.  
  192. Procedure DrawBox(MaY, MaX, MiY, MiX : Integer; rp : RastPortPtr);
  193.    External;
  194.